<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../../Themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../../Themes/icon.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/demo.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/common.css">
		<script type="text/javascript" src="../../../JS/jquery.min.js"></script>
		<script type="text/javascript" src="../../../JS/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../../../JS/finance.js"></script>
		<script type="text/javascript" src="../../../JS/jquery.edatagrid.js"></script>
		<script type="text/javascript" src="../../../JS/common.js"></script>
	</head>

	<body>
		<div class="div_add_info">
			<form id="ff" method="post">
				<div id="p" class="easyui-panel" title="责任书信息" style="width:100%;padding:10px;">
					<table cellpadding="5" class="displaytable">
						<tr>
							<td width="12%">合同编号</td>
							<td width="21%">
								<input style="width:100%" class="easyui-textbox" name="CONTRACT_ID" data-options="required:true"></input>
							</td>
							<td width="12%">合同期限</td>
							<td width="21%">
								<input style="width:100%" class="easyui-textbox" type="contract_term" name="index" data-options="required:true"></input>
							</td>
						</tr>
						<tr>
							<td>开始时间</td>
							<td>
								<input style="width:100%" class="easyui-datebox" data-options="required:true" name="BEGIN_TIME"></input>
							</td>
							<td>结束时间</td>
							<td>
								<input style="width:100%" class="easyui-datebox" data-options="required:true" name="END_TIME"></input>
							</td>
						</tr>
						<tr>
							<td>责任书类型</td>
							<td>
								<input style="width:100%" class="easyui-combobox" data-options="required:true" name="END_TIME"></input>
							</td>
							<td>
								<a class="easyui-linkbutton" style="width: 80px;">签订</a>
							</td>
						</tr>
					</table>
				</div>
				<div id="p" class="easyui-panel" title="基本信息" style="width:100%;padding:10px;">
					<table id="tt">

					</table>
				</div>
				<div class="submit_button">
					<input type="button" onclick="save()" style="width: 100px;" value="保存">
					<input type="button" onclick="cls()" style="width: 100px; margin-left: 5px;" value="清空">
				</div>
			</form>
		</div>
	</body>
	<script type="text/javascript">
		var projectName = [{
			"value": "1",
			"text": "租金"
		}, {
			"value": "2",
			"text": "物业费"
		}, {
			"value": "3",
			"text": "滞纳金"
		}];
		var PaymentMethod = [{
			"value": "1",
			"text": "现金"
		}, {
			"value": "2",
			"text": "预交"
		}, {
			"value": "3",
			"text": "刷卡"
		}];
		var toolbar = [{
			text: '新增',
			iconCls: 'icon-add',
			handler: function() {
				$('#tt').edatagrid('addRow');
			}
		}, {
			text: '取消',
			iconCls: 'icon-cancel',
			handler: function() {
				$('#tt').edatagrid('cancelRow')
			}
		}, {
			text: '保存',
			iconCls: 'icon-save',
			handler: function() {
				$('#tt').edatagrid('saveRow')
			}
		}, {
			text: '删除',
			iconCls: 'icon-remove',
			handler: function() {
				$('#tt').edatagrid('destroyRow')
			}
		}];
		GetTable();

		function GetTable() {
			$('#tt').edatagrid({
				height: 200,
				width: '96%',
				title: '责任书签订情况',
				toolbar: toolbar,
				collapsible: true,
				singleSelect: true,
				fitColumns: true,
				autoSave: true,
				url: '',
				columns: [
					[{
						field: 'BOOST_ID',
						title: '责任书名称',
						width: '50%',
						editor: {
							type: 'combobox',
							options: {
								data: projectName,
								valueField: "text",
								textField: "text",
								editable: false,
								required: true
							}
						}
					},{
						field: 'ID4',
						title: '签订页面',
						width: '50%',
						editor: {
							type: 'numberbox',
							options: {
								precision: 1
							}
						}
					}]
				],
			});
		}
		
		function cls() {
			$('#ff').form('reset');
		}
	</script>

</html>